<?php
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
ini_set('display_errors', '1');
if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class main extends CI_Controller {

    function __construct() {
        parent::__construct();
    }

    public function index() {
        $this->load->library('a_class');
        $class_obj = new a_class();
        $data['class_list'] = $class_obj->get_class_info(CONFIG_ID);

        $this->load->library('a_ad');
        $ad_obj = new a_ad();
        $data['ad_list'] = $ad_obj->get_ad_list_page(1);

        $this->load->library('a_article');
        $article_obj = new a_article();
        $data['article_list'] = $article_obj->get_article_list(CONFIG_ID,2);

        $this->load->library('a_product');
        $product_obj = new a_product();
        $data['product_list'] = $product_obj->get_product_list_page(CONFIG_ID,3);

        $data['block_list'] = $article_obj->get_block_list_page();
        //print_r($data['ad_list']);
        $this->load->view('index',$data);
    }

    public function nofont(){
        $this->load->view('../layout/404-page');
    }

}
